#include <QApplication>
#include <QDir>

#include <iostream>

#include "mainwindow.h"
#include "config.h"

using namespace Tubox;
using namespace TuboxUi;

using std::cerr;
using std::endl;

int main(int argc, char **argv) {
	QApplication app(argc, argv);
	Config config(QDir::homePath() + "/.tuboxconfig");
	try {
		config.load();
	}
	catch( XmlError& e) {
		cerr << "Reading config file failed" << endl;
		return 666;
	}
	MainWindow window(config.getDisk());
	window.show();
	return app.exec();
}
